﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterSGA.Master" AutoEventWireup="true" CodeBehind="MovementsMailing.aspx.cs" Inherits="SGA.Mailing.MovementsMailing.MovementsMailing" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div id="leftcolumnwrap">
        <div id="leftcolumn">
            <p>
                <%--<asp:Button ID="ClearButton" runat="server" Text="Clear" OnClick="ClearButton_Click" CssClass="buttonContext" />--%>
                <input type="reset" value="Limpar" class="buttonContext" />
            </p>
            <p>
                <asp:Button ID="SearchButton" runat="server" Text="Procurar" CssClass="buttonContext" OnClick="SearchButton_Click" />
            </p>
            <p></p>
            <p></p>
        </div>
    </div>

    <div class="InLine">
        <div id="dataDiv">
            <%--DataSources--%>
            <asp:EntityDataSource ID="EDSContactTypes" runat="server" ConnectionString="name=MailingEntities" DefaultContainerName="MailingEntities" EnableFlattening="False" EntitySetName="ContactTypes">
            </asp:EntityDataSource>
            <asp:EntityDataSource ID="EDSPaymentModes" runat="server" ConnectionString="name=MailingEntities" DefaultContainerName="MailingEntities" EnableFlattening="False" EntitySetName="PaymentModes">
            </asp:EntityDataSource>
            <asp:EntityDataSource ID="EDSCountries" runat="server" ConnectionString="name=MailingEntities" DefaultContainerName="MailingEntities" EnableFlattening="False" EntitySetName="Countries">
            </asp:EntityDataSource>
            <%--DataSources Fim --%>

            <div class="InLine" id="leftDiv">
                <div>
                    <asp:Label ID="IdSupportersLbl" runat="server" Text="Num. Aderente" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="IdSupportersTbox" runat="server" Columns="20" />
                </div>

                <div>
                    <asp:Label ID="NameLbl" runat="server" Text="Nome" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="NameTbox" runat="server" Columns="70" />
                </div>
                <div>
                    <asp:Label ID="AddressLbl" runat="server" Text="Morada" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="AddressTbox" runat="server" Columns="70" />
                </div>
                <div>
                    <asp:Label ID="ComplementAddressLbl" runat="server" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="ComplementAddressTbox" runat="server" Columns="70" />
                </div>
                <div>
                    <asp:Label ID="PostalCode4Lbl" runat="server" Text="Cód. Postal" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="PostalCode4Tbox" runat="server" Columns="10" />
                    <asp:TextBox ID="PostalCode3Tbox" runat="server" Columns="3" />
                    <asp:Label ID="LocalLbl" runat="server" ForeColor="#FF3300"></asp:Label>
                </div>
                <div>
                    <asp:DropDownList ID="ContactTypesDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="155" DataSourceID="EDSContactTypes" AutoPostBack="True" OnSelectedIndexChanged="ContactTypesDdl_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:TextBox ID="ContacTbox" runat="server" Columns="70" />
                </div>
            </div>

            <div class="InLine" id="rightDiv">
                <div>
                    <asp:CheckBox ID="BirthdayCheckBox" runat="server" Text='Enviar carta de Aniversário' />
                    <br />
                    <asp:Label ID="BirthdayDayLbl" runat="server" Text="Dia" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="BirthdayDayTbox" runat="server" Columns="3" />
                    <br />
                    <asp:Label ID="BirthdayMonthLbl" runat="server" Text="Mês" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="BirthdayMonthTbox" runat="server" Columns="3" />
                    <br />
                    <asp:Label ID="BirthdayYearLbl" runat="server" Text="Ano" CssClass="RightAlignLabel"></asp:Label>
                    <asp:TextBox ID="BirthdayYearTbox" runat="server" Columns="3" />
                </div>
                <br />
                <div>
                    <asp:CheckBox ID="WantIRSCheckBox" runat="server" Text='Deseja declaração para IRS' />
                </div>
            </div>
        </div>

        <div id="macroDiv">
            <fieldset>
                <legend style="color: blue; font-weight: bold;">Macro</legend>
                <div class="InLine">
                    <asp:Label ID="DataLbl" runat="server" Text="Data" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="ReceiveDataTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="FinalValueLbl" runat="server" Text="Valor" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="FinalValueTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="WantReceiptLbl" runat="server" Text="Quer Recibo" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="WantReceiptDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="100">
                        <asp:ListItem Value="1">Sim</asp:ListItem>
                        <asp:ListItem Value="0">Não</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="PaymentModesLbl" runat="server" Text="Formas Pag." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="PaynetModesDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="155" DataSourceID="EDSPaymentModes">
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="CountriesLbl" runat="server" Text="País" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="CountriesDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="155" DataSourceID="EDSCountries">
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="SendThankLetterLbl" runat="server" Text="Agrad. enviada" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="SendThankLetterDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="100">
                        <asp:ListItem Value="1">Sim</asp:ListItem>
                        <asp:ListItem Selected="True" Value="0">Não</asp:ListItem>
                    </asp:DropDownList>
                </div>
            </fieldset>
        </div>

        <div id="EditDiv">
            <fieldset>
                <legend style="color: blue; font-weight: bold;">Edição</legend>
                <div class="InLine">
                    <asp:Label ID="CampaignEditLbl" runat="server" Text="Camapnha" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="CampaignEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="InicialValueEditLbl" runat="server" Text="Valor Inicial" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="InicialValueEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="ReceiveDataEditLbl" runat="server" Text="Data" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="ReceiveDataEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="FinalValueEditLbl" runat="server" Text="Valor" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="FinalValueEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="PaymentModesEditLbl" runat="server" Text="Formas Pag." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="PaymentModesLblEditDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="155" DataSourceID="EDSPaymentModes">
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="ForeignReceiveDateEditLbl" runat="server" Text="Data Estrg." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="ForeignReceiveDateEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="CountriesEditLbl" runat="server" Text="País" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="CountriesEditDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="155" DataSourceID="EDSCountries">
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="ForeignPaidValueEditLbl" runat="server" Text="Valor Estrg." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="ForeignPaidValueEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="WantReceiptEditLbl" runat="server" Text="Quer Recibo" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="WantReceiptEditDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="100">
                        <asp:ListItem Value="0">Sim</asp:ListItem>
                        <asp:ListItem Value="0">Não</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="SendThankLetterEditLbl" runat="server" Text="Agrad. enviada" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:DropDownList ID="SendThankLetterEditDdl" DataTextField="Designation" DataValueField="Id" runat="server" Width="100">
                        <asp:ListItem Value="1">Sim</asp:ListItem>
                        <asp:ListItem Selected="True" Value="0">Não</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="InLine">
                    <asp:Label ID="LoteAgrEditLbl" runat="server" Text="Lote Agrad." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="LoteAgrEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="FaturaEditLbl" runat="server" Text="Fatura" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="FaturaEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="ReciboEditLbl" runat="server" Text="Recibo" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="ReciboEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="DataCreditoLbl" runat="server" Text="Data Créd." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="DataCreditoTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="AliasEditLbl" runat="server" Text="User" CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="TextBox1" runat="server" Columns="10"></asp:TextBox>
                </div>
                <div class="InLine">
                    <asp:Label ID="LastModifyEditLbl" runat="server" Text="Última modif." CssClass="LeftAlignLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="LastModifyEditTbox" runat="server" Columns="15"></asp:TextBox>
                </div>
            </fieldset>
        </div>

        <div id="listView">
            <asp:ListView ID="MailingLvw" runat="server">

                <%-- AlternatingItemTemplate> --%>
                <ItemTemplate>
                    <tr style="background-color: #FFF8DC;">
                        <td>
                            <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("camp") %>' />
                        </td>
                        <td>
                            <asp:Label ID="IdSupportersLabel" runat="server" Text='<%# Eval("InicialValue") %>' />
                        </td>
                        <td>
                            <asp:Label ID="IdCampaignsLabel" runat="server" Text='<%# Eval("ReceiveDate") %>' />
                        </td>
                        <td>
                            <asp:Label ID="CampaignsLabel" runat="server" Text='<%# Eval("FinalValue") %>' />
                        </td>
                        <td>
                            <asp:Label ID="SupportersLabel" runat="server" Text='<%# Eval("IdPaymentModes") %>' />
                        </td>
                        <td>
                            <asp:Label ID="ResponsesLabel" runat="server" Text='<%# Eval("PaymentModes") %>' />
                        </td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("ForeignReceiveDate") %>' />
                        </td>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("IdCurrency") %>' />
                        </td>
                        <%--<td>
                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("Designation") %>' />
                        </td>--%>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text='<%# Eval("ForeignPaidValue") %>' />
                        </td>
                        <td>
                            <asp:Label ID="Label5" runat="server" Text='<%# Eval("Alias") %>' />
                        </td>
                        <td>
                            <asp:Label ID="Label6" runat="server" Text='<%# Eval("LastModify") %>' />
                        </td>
                    </tr>
                    <%-- /AlternatingItemTemplate> --%>
                </ItemTemplate>
                <LayoutTemplate>
                    <table runat="server">
                        <tr runat="server">
                            <td runat="server">
                                <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; font-family: Verdana, Arial, Helvetica, sans-serif;">
                                    <tr runat="server" style="background-color: #DCDCDC; color: #000000;">
                                        <th runat="server">Campanha</th>
                                        <th runat="server">Valor Inicial</th>
                                        <th runat="server">Data</th>
                                        <th runat="server">Valor Final</th>
                                        <th runat="server">Modo Pag.</th>
                                        <th runat="server">Data Estrg.</th>
                                        <th runat="server">País</th>
                                        <th runat="server">Valor Estrg.</th>
                                        <th runat="server">Agradec.</th>
                                        <th runat="server">Lote Agr.</th>
                                        <th runat="server">Fatura</th>
                                        <th runat="server">Recibo</th>
                                        <th runat="server">Data Crédito</th>
                                        <th runat="server">User</th>
                                        <th runat="server">Última Modif.</th>
                                    </tr>
                                    <tr id="itemPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr runat="server">
                            <td runat="server" style="text-align: center; background-color: #CCCCCC; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000;"></td>
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>
        </div>
    </div>
</asp:Content>
